import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";

// CRM管理-CRM账号-【添加、编辑】
export function addOrEditCrmAccount(data) {
  return request({
    url: "/sysCrm/crm/v1.0.0/addOrEditCrmAccount",
    method: "post",
    data: data,
  });
}
// CRM管理-CRM账号-【删除】
export function delAccount(id) {
  return request({
    url: "/sysCrm/crm/v1.0.0/delAccount",
    method: "get",
    params: { 
      id:parseStrEmpty(id)
    }
  });
}

// CRM管理-CRM账号-【账号列表】分页查询
export function queryCrmAccountByPage(data) {
  return request({
    url: "/sysCrm/crm/v1.0.0/queryCrmAccountByPage",
    method: "post",
    data: data,
  });
}

// CRM管理-CRM账号-【密码重置】
export function resetPassword(params) {
  return request({
    url: "/sysCrm/crm/v1.0.0/resetPassword",
    method: "get",
    params
  });
}

// CRM管理-CRM账号-【接单状态】（0-不接单，1-接单）
export function setAccountOrder(params) {
  return request({
    url: "/sysCrm/crm/v1.0.0/setAccountOrder",
    method: "get",
    params
  });
}

// CRM管理-CRM账号-【账号状态】（0-启动，1-停用，2-暂停）
export function setAccountStatus(params) {
  return request({
    url: "/sysCrm/crm/v1.0.0/setAccountStatus",
    method: "get",
    params
  });
}


// CRM管理-CRM账号-[筛选领导]列表查询
export function queryCrmLeaderList(params) {
  return request({
    url: "/sysCrm/crm/v1.0.0/queryCrmLeaderList",
    method: "get",
    params
  });
}
